import { getAction, deleteAction, postAction, httpAction, postFormData, downFile } from '@/api/manage'
const api = '/api/gateway/jic-backend-activity'
const gateway = '/backend/less'
const baseUrl = window._CONFIG['domianURL'] || '/jeecg-boot'
// const baseUrl = 'http://localhost:8001'
export const storeGroupList = (params) => postAction(api + gateway + `/store/list`, params) // 分页获取门店组列表
export const saveOrUpdateStore = (params) => postAction(api + gateway + `/store/edit`, params) // 编辑门店组
export const storeGroupDetail = (params) => postFormData(api + gateway + `/store/detail`, params) // 获取门店组信息
export const removeStoreGroup = (params) => postFormData(api + gateway + `/store/remove`, params) // 删除门店组
export const storeTemplateDonwload = baseUrl + api + gateway + '/store/template' // 下载门店导入模版
export const importStore = baseUrl + api + gateway + '/store/import' // 导入门店

export const brandList = (params) => postAction(api + gateway + `/brand/list`, params) // 分页查询品牌列表

export const activityInfoList = (params) => postAction(api + gateway + `/activity/list`, params) // 分页挚友活动列表
export const activityDetail = (params) => postAction(api + gateway + `/activity/detail`, params) // 获取挚友活动信息
export const saveOrUpdateActivity = (params) => postAction(api + gateway + `/activity/edit`, params) // 编辑或新增挚友活动
export const removeActivity = (params) => postAction(api + gateway + `/activity/remove`, params) // 删除挚友活动
export const onOrOffActivity = (params) => postAction(api + gateway + `/activity/on/off`, params) // 挚友活动启禁用

export const dataAnalyseVisit = (params) => postAction(api + gateway + `/data/analyse/visit`, params) // 数据统计访问量
export const dataAnalysSegmented = (params) => postAction(api + gateway + `/data/analyse/segmented`, params) // 数据统计分段维度统计
export const dataAnalyseCoupon = (params) => postAction(api + gateway + `/data/analyse/coupon`, params) // 数据统计卷统计
export const dataAnalyseCouponExport = (params) => downFile(api + gateway + `/data/analyse/coupon/export`, params) // 导出卷统计

export const themeList = (params) => postAction(api + gateway + `/theme/list`, params) // 分页专题列表
export const onOrOffTheme = (params) => postAction(api + gateway + `/theme/on/off`, params) // 专题启禁用
export const removeTheme = (params) => postAction(api + gateway + `/theme/remove`, params) // 删除专题
export const themeDetail = (params) => postAction(api + gateway + `/theme/detail`, params) // 获取专题信息
export const saveOrUpdateTheme = (params) => postAction(api + gateway + `/theme/edit`, params) // 编辑或新增挚友活动
export const storeList = (params) => postAction(api + gateway + `/theme/store/list`, params) // 分页专题列表
export const createPromotionQRcode = (params) => postAction(api + gateway + `/theme/activity/code`, params) // 专题活动投放码
